'use strict'

var fs = require('fs')
var spawn = require('child_process').spawn
var path=require('path')

fs.watch(path.join(__dirname,'application/views'), function(evt, filename) {
	console.log('event:' + evt + ' filename:' + filename)
	var upload = spawn('./upload.sh')
	upload.stdout.pipe(process.stdout)
})